package com.room.mapper;

import com.room.pojo.Bedroom;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface BedroomMapper {
    int deleteByPrimaryKey(String bedroomId);

    int insert(Bedroom record);

    int insertSelective(Bedroom record);

    Bedroom selectByPrimaryKey(String bedroomId);

    int updateByPrimaryKeySelective(Bedroom record);

    int updateByPrimaryKey(Bedroom record);

     List<Bedroom> find(Map map);

     int update(Bedroom bedroom);

     String getMaxId();

     @Select("select bedroom_id as bedroomId , bedroom_name as bedroomName  from bedroom where apartment_id = #{apartmentId}")
     List<Bedroom> getBedroomByApartId(String apartmentId);

     @Select("select * from bedroom where bedroom_id = #{roomId}")
     Bedroom getBedroomByRoomId(String roomId);


}